export function getAbsolutePosition(element) {
    let actualTop = element.offsetTop;
    let actualLeft = element.offsetLeft;
    let current = element.offsetParent;
    while (current !== null) {
        actualTop += current.offsetTop;
        actualLeft += current.offsetLeft;
        current = current.offsetParent;
    }
    return {top: actualTop, left: actualLeft};
}
